import config from "@/config"
import http from "@/utils/request"

export default {
	getPageList: {
		url: `${config.API_URL}/api/Post/GetPostPageList`,
		name: "根据关键字获取对应的分页列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	getAllList: {
		url: `${config.API_URL}/api/Post/GetAllList`,
		name: "获取所有岗位列表信息",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	forbidOrEnable: {
		url: `${config.API_URL}/api/Post/ForbidOrEnable`,
		name: "禁用/启用岗位",
		put: async function(data={}){
			return await http.put(this.url, data);
		}
	},
	create: {
		url: `${config.API_URL}/api/Post/Create`,
		name: "创建岗位信息",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	update: {
		url: `${config.API_URL}/api/Post/Update`,
		name: "编辑岗位信息",
		put: async function(data={}){
			return await http.put(this.url, data);
		}
	},
	updatePostUser: {
		url: `${config.API_URL}/api/Post/UpdatePostUser`,
		name: "更新岗位-用户信息",
		put: async function(data={}){
			return await http.put(this.url, data);
		}
	},
	deleteById: {
		url: `${config.API_URL}/api/Post/DeleteById`,
		name: "根据Id删除岗位信息",
		delete: async function(data={}){
			return await http.delete(this.url, data);
		}
	},
	deleteUserPost: {
		url: `${config.API_URL}/api/Post/DeleteUserPost`,
		name: "删除指定的用户-岗位关系",
		delete: async function(data={}){
			return await http.delete(this.url, data);
		}
	}

	
}
